From da102a0d2f9045745a9bb54a73befba3bce343e9 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 8 Apr 2004 17:58:59 +0000 Subject: [PATCH] Correctly endian-swap altitude. Fix geocache icon mappings for GPX files w/o tags. --- gpsbabel/mapsource.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gpsbabel/mapsource.c b/gpsbabel/mapsource.c index a22647c27..c0270b82c 100644 --- a/gpsbabel/mapsource.c +++ b/gpsbabel/mapsource.c @@ -607,7 +607,8 @@ mps_waypoint_w(FILE *mps_file, int mps_ver, const waypoint *wpt, const int isRou /* might need to change this to handle version dependent icon handling */ icon = mps_find_icon_number_from_desc(wpt->icon_descr, MAPSOURCE); - if (get_cache_icon(wpt) && wpt->icon_descr && (strcmp(wpt->icon_descr, "Geocache Found") != 0)) { + fprintf(stderr, "%s ", wpt->icon_descr); + if (get_cache_icon(wpt) /* && wpt->icon_descr && (strcmp(wpt->icon_descr, "Geocache Found") != 0)*/) { icon = mps_find_icon_number_from_desc(get_cache_icon(wpt), MAPSOURCE); } @@ -1223,9 +1224,12 @@ mps_routehdr_w(FILE *mps_file, int mps_ver, const route_head *rte) fwrite(zbuf, 9, 1, mps_file); } else { + unsigned char cbuf[8]; hdr[0] = 1; + le_read64(cbuf, &minalt); + fwrite(hdr, 1 , 1, mps_file); - fwrite(&minalt, 8 , 1, mps_file); + fwrite(cbuf, 8 , 1, mps_file); } le_write32(&rte_datapoints, rte_datapoints); -- 2.30.2